using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public static class VExcel_AssetLoadPath
{
    //这里我们要讨论的是如何描述一个资产,  {别名+路径+类型}  + 额外描述信息, 可配表的信息+硬配置在表中的信息 
    // public static readonly Dictionary<string, VAsset> assets;
    public static List<VAsset> preloads;



    //所以用多个列表就可以实现分类存放, 用一次枚举代替类型转换的开销, 小体量前期先不管了
    public static List<VAsset> Preload(Action<VAsset> loadAction)
    {
        preloads?.Clear();
        preloads = new List<VAsset>()
        {
            // new VPrefab()
            // {
            //     name = "visualNode",
            //     assetPath = "Assets/only-sframework/AddressableAssets/VisualNode.prefab",
            // },
            // new VPrefab()
            // {
            //     name = "VGUICanvasBase",
            //     assetPath = "Assets/only-sframework/VGUI/Prefab/VGUICanvasBase.prefab"
            // },
            // new VPrefab()
            // {
            //     name = "DarkBullet",
            //     assetPath = "Assets/only-sframework/AddressableAssets/DarkBullet.prefab"
            // },
            // new VPrefab()
            // {
            //     name = "DarkBulletHit",
            //     assetPath = "Assets/only-sframework/AddressableAssets/DarkBullet_Hit.prefab"
            // },
            // new VAudioClip()
            // {
            //     name ="DarkBulletHit_wav",
            //     assetPath = "Assets/only-sframework/AddressableAssets/notverydamage.wav"
            // },
            new VAnimation(){
                name = "Walk",
                assetPath = "Assets/vframework/AddressableAssets/male_move_walk_normal.anim"
            },
            new VAnimation(){
                name = "Sit",
                assetPath = "Assets/vframework/AddressableAssets/female_act_sit_on_chair.anim"
            },
            new VAnimation(){
                name = "PickUp",
                assetPath = "Assets/vframework/AddressableAssets/male_act_pickup.anim"
            },
            new VAnimation(){
                name = "Give",
                assetPath = "Assets/vframework/AddressableAssets/MCU_am_StandConv_Trade_09_AGive_BTake_PairA.anim"
            }
        };

        preloads.ForEach(x => loadAction(x));
        return preloads;
    }
}
